﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;

public partial class MasterPage_MasterPage_CMS : System.Web.UI.MasterPage
{
    private string _activeli = "";
    private bool _LeftExist = true;
    public string Activeli
    {
        set
        {
            _activeli = value;
        }
        get
        {
            return _activeli;
        }
    }

    public bool LeftExist
    {
        set
        {
            _LeftExist = value;
        }
        get
        {
            return _LeftExist;
        }
    }

    Usas.Common.Cms.CurrentInfo cinfo = new Usas.Common.Cms.CurrentInfo();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Activeli = "default";
     
            if (cinfo.GetEmpId() == "")
            {
                Response.Redirect("../InfoLogin.aspx");
            }

            if (LeftExist)
            {
                Left.Visible = true;
                Right.Visible = true;
            }
            else
            {
                Left.Visible = false;
                Right.Visible = true;
                Right.Attributes.Add("style", "width:955px;min-height: 800px; height: auto !important; height: 800px; overflow: visible;");
            }
            //System.Web.UI.HtmlControls.HtmlAnchor href = this.form1.FindControl(Activeli) as System.Web.UI.HtmlControls.HtmlAnchor;
            //href.Attributes.Add("class", "active");


        }
    }

    protected void GoToOA_Click(object sender, EventArgs e)
    {
        Response.Redirect("../WebClientMainFlow.aspx");
        return;
    }
    protected void logout_Click(object sender, EventArgs e)
    {
        Session.Abandon();
        Response.Redirect("../InfoLogin.aspx");
    }
    protected void Search_Click(object sender, EventArgs e)
    {
        Response.Redirect("../WebClientMainFlow.aspx");
       
    }


    #region Tabs样式 
    public void CheckHover()
    {
        SearchTabs1.CssClass = CMS_SearchTabs.ShowMode.CmsCheck;
    }

    public void PublicHover()
    {
        SearchTabs1.CssClass = CMS_SearchTabs.ShowMode.CmsMyPublic;
    }


    public void ManagerHover()
    {
        SearchTabs1.CssClass = CMS_SearchTabs.ShowMode.CmsManager;
    }

    public void TimeSheetHover()
    {
        SearchTabs1.CssClass = CMS_SearchTabs.ShowMode.CmsTimeSheet;
    }
    #endregion
}
